<template>
  <div class="listArr">
    <ul>
      <li v-for="(val,index) in list" :key="val.path" @click="changRouter(val.path)">
        <i :class="['iconfont', val.ico]"></i>
        <span>{{val.text}}</span>
        <i class="iconfont right icon-xiaobiaoti"></i>
      </li>
    </ul>
  </div>
</template>

<script>
import { skip } from "ulit/skipRouter";
export default {
  name: "listArr",
  data() {
    return {
      list: [
        {
          text: "基本信息",
          ico: "icon-gerenxinxi",
          path: "message",
        },
        {
          text: "我的动态",
          ico: "icon-wodedongtai",
          path: "myfeed",
        },
        {
          text: "我的学分",
          ico: "icon-xuefen",
          path: "grade",
        },
        {
          text: "校园公告",
          ico: "icon-gonggao",
          path: "notice",
        },
        {
          text: "建议反馈",
          ico: "icon-fankui",
          path: "feedback",
        },
        {
          text: "关于我们",
          ico: "icon-guanyuwomen",
          path: "about",
        },
      ],
    };
  },
  methods: {
    changRouter(path) {
      skip(this, path);
    },
  },
};
</script>

<style lang="less" scoped>
.listArr {
  box-sizing: border-box;
  padding: 0 1rem;
  ul {
    list-style: none;
    font-family: "Courier New", Courier, monospace;
    font-size: 1.3rem;
    li {
      padding: 0.5rem 0;
      border-bottom: 1px solid #ededed;
      .right {
        float: right;
      }
      i {
        font-size: 1.2rem;
      }
      span {
        margin-left: 1rem;
      }
    }
  }
}
</style>